<!-- @Author: Yu_Bo -->
<template>
	<view class="entryexit">
		<u-popup v-model="show" mode="center" :mask-close-able="false">
			<view class="main">
				<view class="main_title">
					{{type==1?'入库成功':'出库成功'}}
				</view>
				<view class="main_img">
					<image :src="info.image" mode=""></image>
				</view>
				<view class="main_name">
					{{info.goods_name}}
				</view>
				<view class="main_tip">
					{{info.author}}/{{info.press}}
				</view>
				<view class="main_txt">
					库存: {{info.book_num}}<text v-if="info.supply || info.supply == 0">可调拨量：{{info.supply}}</text>
				</view>
			</view>
			<view class="close">
				<image @click="closeBtn" src="@/static/images/img/close.png" mode=""></image>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		components: {},
		props: {
			type: {
				type: Number,
				default: 1
			},
		},
		data() {
			return{
				show: false,
				info: null,
			}
		},
		computed: {},
		mounted() {},
		methods: {
			// 打开
			openBtn(info) {
				this.info = info
				this.show = true
			},
			// 关闭
			closeBtn() {
				this.show = false
			}
		},
	}
</script>

<style lang='scss' scoped>
	.entryexit {
		.main {
			width: 600rpx;
			padding: 50rpx;
			border-radius: 40rpx;
			background: linear-gradient(to bottom, #6FECFF, #F5FEFF, #FFFFFF);
			
			.main_title {
				width: 100%;
				text-align: center;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 36rpx;
				color: #222222;
			}
			
			.main_img {
				width: 100%;
				padding-top: 50rpx;
				
				 image {
					 display: block;
					 width: 180rpx;
					 height: 240rpx;
					 margin: auto;
				 }
			}
			
			.main_name {
				width: 100%;
				padding-top: 40rpx;
				text-align: center;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 32rpx;
				color: #222222;
			}
			
			.main_tip {
				width: 100%;
				padding-top: 20rpx;
				text-align: center;
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 26rpx;
				color: #666666;
			}
			
			.main_txt {
				width: 100%;
				padding-top: 20rpx;
				text-align: center;
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 28rpx;
				color: #5A68FF;
				
				text {
					padding: 0 20rpx;
				}
			}
		}
		
		.close {
			width: 100%;
			padding-top: 120rpx;
			
			image {
				display: block;
				width: 80rpx;
				height: 80rpx;
				margin: auto;
			}
		}
	}
</style>